package com.jiawa.train.common.exception;

/**
 * @ClassName BusinessException
 * @Description
 * @Author GateOfRust
 * @Date 2024/5/15 下午11:56
 * @Version 1.0
 */

public class BusinessException extends RuntimeException{

    private BusinessExceptionEnum anEnum;


    public BusinessException(BusinessExceptionEnum anEnum) {
        this.anEnum = anEnum;
    }

    public BusinessExceptionEnum getAnEnum() {
        return anEnum;
    }

    public void setAnEnum(BusinessExceptionEnum anEnum) {
        this.anEnum = anEnum;
    }

     /**
       * 重写堆栈信息，直接返回当前类的错误信息
      **/
    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
